package cn.iocoder.yudao.module.crossborder.finance.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 汇率信息 DTO
 *
 * @author LHL
 */
@Schema(description = "RPC 服务 - 汇率信息 DTO")
@Data
public class ExchangeRateDTO {

    @Schema(description = "汇率编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long id;

    @Schema(description = "源货币", requiredMode = Schema.RequiredMode.REQUIRED, example = "USD")
    private String fromCurrency;

    @Schema(description = "目标货币", requiredMode = Schema.RequiredMode.REQUIRED, example = "CNY")
    private String toCurrency;

    @Schema(description = "汇率", requiredMode = Schema.RequiredMode.REQUIRED, example = "6.8")
    private BigDecimal rate;

    @Schema(description = "汇率类型", example = "1")
    private Integer rateType;

    @Schema(description = "买入价", example = "6.79")
    private BigDecimal buyRate;

    @Schema(description = "卖出价", example = "6.81")
    private BigDecimal sellRate;

    @Schema(description = "中间价", example = "6.80")
    private BigDecimal middleRate;

    @Schema(description = "汇率来源", example = "央行")
    private String source;

    @Schema(description = "生效时间")
    private LocalDateTime effectiveTime;

    @Schema(description = "失效时间")
    private LocalDateTime expireTime;

    @Schema(description = "是否启用", example = "true")
    private Boolean enabled;

    @Schema(description = "备注", example = "实时汇率")
    private String remark;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}
